<template>
  <BasicModal @register="register" title="Modal Title" 
   :helpMessage="['提示1', '提示2']" @ok="handleSubmit"  @cancel="handleCancel">
    <BasicForm @register="register2">

    </BasicForm>
  </BasicModal>
</template>

<script lang="ts" setup>
import { BasicForm, useForm } from '/@/components/Form';
import { societyActivity } from './data/societyActivity';
import { BasicModal, useModalInner } from '/@/components/Modal';

const [register, { closeModal }] = useModalInner();
const [register2, { validate,  getFieldsValue }] = useForm({
  labelCol: {
    span: 8,
  },
  wrapperCol: {
    span: 10,
  },
  baseColProps: {
    //这个是占用位置,一行共24个
    span: 24,
  },
  schemas: societyActivity,
  actionColOptions: {
    offset: 8,
    span: 12,
  },
  submitButtonOptions: {
    text: '提交',
  },
  showSubmitButton:false,
  showResetButton:false
});
const emits=defineEmits(["giveFather"])
async function handleSubmit() {
        await validate();
        const values = await getFieldsValue();
        emits('giveFather', values)
        closeModal();
      }

      function handleCancel() {
        closeModal();
      }
// setModalProps: () => {
//     setModalProps({ title: 'Modal New Title' });
//   },
</script>./data/societyActivity
